home *** CD-ROM | disk | FTP | other *** search
- #ifndef MF3D_MEMORY_H
- #define MF3D_MEMORY_H
- /*==============================================================================
- *
- * File: MFMEMORY.H
- *
- * Function: Memory allocation routines.
- *
- * Author(s): Rick Wong (RWW)
- *
- * Copyright: (c) 1995 by Apple Computer, Inc., all rights reserved.
- *
- * Change History (most recent first):
- * Fabio Changed file name to 8 characters
- * F3L_RWW File created.
- *==============================================================================
- */
- #if defined(__COMPILING_ON_MACINTOSH__)
- #pragma once
- #endif
-
- #if defined(DEBUG) && DEBUG > 1
- #include <stdio.h>
- #endif
- #include <stdlib.h>
-
- #if defined(DEBUG) && DEBUG > 1
- #if !defined(MF3D_MEMORY_C)
- int gMallocCount = 0;
- #else
- extern int gMallocCount;
- #endif
- #endif
-
- void *MF3D_Malloc(size_t size);
- void *MF3D_Realloc(void *ptr, size_t size);
- void MF3D_Free(void *ptr);
-
- #if !defined(MF3D_MEMORY_C) && defined(DEBUG) && DEBUG > 1
- #define MF3D_Malloc(x) (printf("File \"%s\"; Line %d\n", __FILE__, __LINE__), MF3D_Malloc(x))
- #endif
-
- #endif
-